<?php
namespace app\finance\model;
use think\Db;
use app\common\model\Common;
class Cate extends Common
{
	protected $table = 'mps_expend_cate';
	
	/**
	* 获取记账分类
	*/
	public function getCate($ty)
	{
		$data = $this->where('ty',$ty)->order('expend_cate_id asc')->select();
		if($data){
			foreach($data as $k => $v){
				$data[$k]['oper'] = true;
				if( in_array($v['expend_cate_id'], config('status.pay_config')) ){
					$data[$k]['oper'] = false;
				}
			}
		}
		return $data;
	}
}